package com.ycc.biz.service;

import com.ycc.biz.pojo.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycc.biz.pojo.vo.LoginUserVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author 吴彦良
* @description 针对表【sys_user(用户表)】的数据库操作Service
* @createDate 2025-03-07 15:16:41
*/
public interface SysUserService extends IService<SysUser> {

    /**
     * 用户注册
     * @param userAccount
     * @param userPassword
     * @param checkPassword
     * @return
     */
    String userRegister(String userAccount, String userPassword, String checkPassword);

    /**
     * 用户登录
     * @param userAccount
     * @param userPassword
     * @param request
     * @return
     */
    LoginUserVO userLogin(String userAccount, String userPassword, HttpServletRequest request);
    
    /**
     * 用户登出
     * @param request
     * @return
     */
    boolean userLogout(HttpServletRequest request);
    
    /**
     * 获取当前登录用户
     * @param request
     * @return 当前登录用户信息，未登录则返回null
     */
    SysUser getLoginUser(HttpServletRequest request);
    
    /**
     * 获取当前登录用户（VO对象）
     * @param request
     * @return 当前登录用户VO信息，未登录则返回null
     */
    LoginUserVO getLoginUserVO(HttpServletRequest request);
}
